import type { RouteRecordRaw } from 'vue-router';

import { $t } from '#/locales';

const SystemRoute: RouteRecordRaw[] = [
  {
    path: '/system',
    name: 'System',
    redirect: '/system/user',
    meta: {
      title: $t('routes.system.system'),
      sort: 1,
      icon: 'mdi:shield-account-outline',
    },
    children: [
      {
        path: 'user',
        name: 'SystemUser',
        component: () => import('#/views/system/user/list.vue'),
        meta: {
          title: $t('routes.system.user'),
          icon: 'mdi:account-multiple',
        },
      },
      {
        path: 'role',
        name: 'SystemRole',
        component: () => import('#/views/system/role/list.vue'),
        meta: {
          title: $t('routes.system.role'),
          icon: 'mdi:shield-account',
        },
      },
      {
        path: 'permission',
        name: 'SystemPermission',
        component: () => import('#/views/system/permission/list.vue'),
        meta: {
          title: $t('routes.system.permission'),
          icon: 'mdi:shield-key',
        },
      },
      {
        path: 'operation-log',
        name: 'SystemOperationLog',
        component: () => import('#/views/system/operationLog/index.vue'),
        meta: {
          title: $t('routes.system.operationLog'),
          icon: 'mdi:clipboard-text-clock',
        },
      },
      {
        path: 'menu',
        name: 'SystemMenu',
        component: () => import('#/views/system/menu/list.vue'),
        meta: {
          title: $t('routes.system.menu'),
          icon: 'mdi:menu',
        },
      },
    ],
  },
];

export default SystemRoute;
